package com.jtjrenren.android.taxi.passenger.core.user.login;

import com.jtjrenren.android.taxi.passenger.Constants;
import com.jtjrenren.android.taxi.passenger.manger.api.ApiWorks;
import com.jtjrenren.android.taxi.passenger.utils.ModuleUtils;

/**
 * Created by Administrator on 2016/9/12.
 */

public class LoginInteractorImpl implements LoginInteractor {
    @Override
    public void checkPhone(String phone, ApiWorks.ResponseListener listener) {
        ApiWorks.checkPhoneUnie(phone, listener);
    }

    @Override
    public void loginByPwd(String phone, String pwd, ApiWorks.ResponseListener listener) {
        ApiWorks.login(phone, ModuleUtils.DesEncry(pwd), listener);
    }

    @Override
    public void loginByCode(String phone, String code, ApiWorks.ResponseListener listener) {
        ApiWorks.loginByAuthCode(phone, code, Constants.DEFAULT_SMSTYPE_REGISTER,
                listener);
    }

    @Override
    public void getYzm(String phone, ApiWorks.ResponseListener listener) {
        ApiWorks.sendAuthCode(phone, Constants.DEFAULT_SMSTYPE_REGISTER, listener);
    }


}
